<div id="edit_designer_<%= @designer.id %>" class='new_or_edit'>
  <div class='form'>
    <% remote_form_for @designer,
            :update => "edit_designer_#{@designer.id}",
            :url => designer_url(@designer),
            :method => :put,
            :loading => short_loader( "edit_designer_#{@designer.id}", :height_from => "edit_designer_#{@designer.id}", :width_from => "edit_designer_#{@designer.id}"),
            :html => {
              :id => "edit_designer_#{@designer.id}_form"
            } do |f| %>
      <dl>
        <dt>设计师-姓名：</dt>
        <dd>
          <%= f.text_field :full_name, :size => 90 %>
        </dd>
      </dl>
      <dl class='l'>
        <dt>所在部门：</dt>
        <dd>
          <%= hidden_field_tag :department_id, params[:department_id] %>
          <%= f.select :department_id, Department.all.collect {|d| [ d.name, d.id ] }  %>
        </dd>
      </dl>
      <dl>
        <dt>座机：</dt>
        <dd>
          <%= f.text_field :office_phone, :size => 90 %>
        </dd>
      </dl>
      <dl>
        <dt>手机：</dt>
        <dd>
          <%= f.text_field :cell_phone, :size => 90 %>
        </dd>
      </dl>
      <dl>
        <dt class='l'>备注：</dt>
        <dd>
          <%= f.text_area :remark %>
        </dd>
      </dl>
    <% end %>
  </div>
  <div class='buttons'>
    <%= link_to_function '保存',
              "$('edit_designer_#{@designer.id}_form').onsubmit()",
              :class => 'save button'
          %>
    <%= link_to_remote '返回',
              :update => "right",
              :url => designers_url(
                :department_id => @designer.department_id
              ),
              :method => :get,
              :html => {
                :class => 'go_back button'
              }
          %>
  </div>
</div>